package org.lojzesframework.freeMarker.gen;

import java.util.HashMap;
import java.util.Map;

import org.lojzesframework.freeMarker.datamodel.JavaData;
import org.lojzesframework.freeMarker.utils.FileUtils;
import org.lojzesframework.freeMarker.utils.FreeMakerUtils;

public class JavaGenFile implements GenFile{
	public boolean genFiles() {
		String javaTplName = "java.ftl";
		String javaFileName = "student.java";
		JavaData javaData = new JavaData();
		javaData.setIndex("index");
		javaData.setViewName("index.jsp");
		Map  map = new HashMap();
		map.put("javaData", javaData);
		String content = FreeMakerUtils.getContent(javaTplName, map);
		return FileUtils.writeFile(GenFile.baseFilePath+javaFileName, content);
	}

}
